Skip to content

20 gou 02 memory gpupack marshal substrate - #21

Merged
K-T0BIAS merged 3 commits into
4-native-gpu-support-cthreads-for-vulkanspir-vfrom
20-gou-02-memory-gpupack-marshal-substrate
Sep 6, 2026
Merged

20 gou 02 memory gpupack marshal substrate#21
K-T0BIAS merged 3 commits into
4-native-gpu-support-cthreads-for-vulkanspir-vfrom
20-gou-02-memory-gpupack-marshal-substrate

Conversation

@K-T0BIAS

@K-T0BIAS K-T0BIAS commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Context TransferEngine (reused command pool + fence; grow-on-demand staging) drives memory::upload_buffer / download_buffer
  • GpuPack: one device-local scalar SSBO + N list SSBOs; empty lists keep a slot with no VkBuffer
  • Typed errors: VulkanOutOfMemory, GpuInvalidArgument, GpuUseAfterDestroy (mapped in cthreads.gpu)
  • Test-only _ext.gpu.testing round-trips + probes; not re-exported on public cthreads.gpu
  • Pytest: pack round-trips / empty lists / staging grow; skip if GPU unavailable
  • CMake: pack + testing sources under CTHREADS_GPU

Out of scope (later issues)

  • In-place Python marshal / gpu() launch (Issue 6)
  • Descriptors, SPIR-V, GpuJob.join (Issue 3)

Test plan

  • Rebuild with CTHREADS_GPU=ON
  • pytest tests/unit/test_gpu_context.py tests/unit/test_gpu_pack.py -v
  • Confirm CPU-only build still imports (available() -> False, no _ext.gpu)

Device-local SSBOs with staging via a Context-owned transfer engine,
option-5 GpuPack, typed GPU errors, and test-only _ext.gpu.testing round-trips.
@K-T0BIAS K-T0BIAS self-assigned this Sep 6, 2026
@K-T0BIAS K-T0BIAS added the sub-feature Piece of a larger enchancement label Sep 6, 2026
@K-T0BIAS
K-T0BIAS merged commit 8ae0ec4 into 4-native-gpu-support-cthreads-for-vulkanspir-v Sep 6, 2026
2 checks passed
@K-T0BIAS
K-T0BIAS deleted the 20-gou-02-memory-gpupack-marshal-substrate branch September 6, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sub-feature Piece of a larger enchancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants